<?php
/**
 * Created by PhpStorm.
 * User: 周超
 * Date: 2016/11/17
 * Time: 17:50
 */

namespace App\Http\Routes;

use Illuminate\Contracts\Routing\Registrar;
class ProductsBackRoute
{
    public function map(Registrar $router)
    {
        $router->group(['middleware' =>   ['web','auth','permissions.check'],
            'prefix' => 'backstage/products',], function ($router) {
            $router->get('list/{type?}',['uses' =>'Backstage\ProductsController@getList'])->name('get.products.list');
            $router->get('detail/{product_id}',['uses' =>'Backstage\ProductsController@getDetail'])->name('get.products.list.detail');
            $router->post('show',['uses' =>'Backstage\ProductsController@postShow'])->name('post.products.list.show');
            $router->post('create-product',['uses' =>'Backstage\ProductsController@postCreateProduct'])->name('post.products.list.create-product');

            $router->post('rebuild-print-img',['uses' =>'Backstage\PrintControllers@rebuildPrintImg'])->name('get.products.list.rebuild-print-img');
            $router->get('create-product-from-backstage',['uses'=>'Backstage\ProductsController@getCreateProductFromBackstage'])->name('get.products.list.create-product-from-backstage');
            $router->post('create-product-from-backstage',['uses'=>'Backstage\ProductsController@postCreateProductFromBackstage'])->name('post.products.list.create-product-from-backstage');
            $router->post('search-tag-list',['uses'=>'Backstage\ProductsController@postSearchTagList'])->name('post.products.list.search-tag-list');
            $router->post('source-pic-list',['uses'=>'Backstage\ProductsController@postSourcePicList'])->name('post.products.list.source-pic-list');
            $router->post('bluk-add-source-pic',['uses'=>'Backstage\ProductsController@postUploadSourcePicSimpleInfo'])->name('post.products.list.bluk-add-source-pic');
            $router->post('update-price',['uses'=>'Backstage\ProductsController@postUpdatePrice'])->name('post.products.list.update-price');
            
            
        });
    }
}